Skip to content

fix: correct fyers holdings mapping for investment value and avg price#1053

Open
preet225 wants to merge 4 commits intomarketcalls:mainfrom
preet225:main
Open

fix: correct fyers holdings mapping for investment value and avg price#1053
preet225 wants to merge 4 commits intomarketcalls:mainfrom
preet225:main

Conversation

@preet225
Copy link

@preet225 preet225 commented Mar 5, 2026

Fix: Correct Fyers holdings data mapping

Resolved issues where:

  • Total Investment Value was showing ₹0
  • Total PnL Percentage was always 0%
  • Avg Price was not displayed in holdings table

Updated fyers order_data mapping to correctly transform holdings data.

Now the holdings page correctly shows:

  • Average Price
  • Total Investment Value
  • Accurate PnL %

Tested on local OpenAlgo dashboard.


Summary by cubic

Fixes Fyers holdings mapping so Avg Price, LTP, Total Investment Value, and PnL% display correctly in the dashboard. Maps costPrice to average_price, sets product from holdingType, rounds to 2 decimals, and computes pnlpercent with a divide-by-zero guard.

Written for commit fe407f9. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant